#!/bin/bash
# check if either a directory or file exists.

item_name=$HOME
echo 
echo "The item being checked: $item_name"
echo 

if [ -e $item_name ]; then
    echo "The item, $item_name, does exists."
    echo "But is a file?"
    echo 
    if [ -f $item_name ]; then
        echo "Yes, $item_name is file."
    else
        echo "No, $item_name is not a file."
    fi
else
    echo "The item, $item_name, does not exists."
fi
